package com.qidianit.mes.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/19 - 13:38
 * @ Description:
 */
@Data
@TableName("workflow_process")
public class WorkflowProcess {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("workflow_id")
    private Integer workflowId;

    @TableField("process_id")
    private Long processId;

    private Integer stepOrder;

    private Long relationNext;

    private String ganttColor;

    private Integer isCritical = 0;

    private Integer needInspection = 0;

    private Integer prepTime = 0;

    private Integer waitTime = 0;

    private String remarks;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    private String createBy;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;

    private String updateBy;

    private Integer deleteFlag = 0;

    private Process process; // 当前工序对象
    private Process nextProcess;// 下一个工序对象
    private SysDictData relationNextDict;// 和下一个工序的关系对应的字典数据对象
}
